/**
 * 
 */
package com.jm.web.tags.table;

import com.jm.web.builder.table.TrBuilder;
import com.jm.web.tags.support.BaseFormItemTag;

/**
 * @author yanjie
 * Jan 30, 2012 2:25:29 PM
 */
public class TrTag extends BaseFormItemTag{
	private static final long serialVersionUID = 3577659277784616377L;
	protected TbodyTag tbodyTag = null;
	
	@Override
	protected void preStartTag() {
		this.getPage().getReturnData().getGroupMap().clear();
		if(this.getParent() != null && this.getParent() instanceof TbodyTag){
			this.tbodyTag = (TbodyTag)this.getParent();
		}
		super.preStartTag();
	}
	
	public void setAlign(String strValue) {
		SetExtValue("align",strValue);
	}
	
	public void setDirty(String strValue) {
		SetExtValue("dirty",strValue);
	}
	
	@Override
	public String getBuilderName() {
		return TrBuilder.class.getName();
	}
	
	public TbodyTag getTbodyTag() {
		return tbodyTag;
	}
	
	@Override
	public void clear() {
		tbodyTag = null; 
		super.clear();
	}
}
